***************************************************************
HiMIPv6 Project 
Installation Guide for Mobile Node

By Chung-Chun Huang, Cheng-Wei Lee, Fan Liu, and 
Professor Yeali S. Sun
***************************************************************

0. Install RedHat 7.2,including the kernel source on your machines. 
	We recommand that you choose LILO to be boot manager.
	
	Copy the entire data on the HiMIPv6_Install_packages to SOMEWHERE.
	We STRONGLY recommand that SOMEWHERR = /root
	

1. Patch MobileIPv6/HiMIPv6 patch file, and make new kernel

	a. Backup Liuux source(Optional)
		# tar -zcvf /usr/src/linux-2.4.7-10.tgz /usr/src/linux-2.4.7-10

	b. Generate the file: /usr/src/linux-2.4/.config
		# cd /usr/src/linux-2.4.7-10
    	# make menuconfig
    	Make no changes. Save and Exit.

	c. Patch MobileIPv6
		# cd SOMEWHERE
		# tar -zxvf mipv6-0.9-v2.4.7.tar.gz
		# cp SOMEWHERE/mipv6-0.9-v2.4.7/mipv6-0.9-v2.4.7.patch /usr/src/linux-2.4.7-10
		# cd /usr/src/linux-2.4.7-10
		# patch -p1 < mipv6-0.9-v2.4.7.patch

	d. Patch HiMIPv6 
		# cp SOMEWHERE/HiMIPv6_HACNMN-v2.4.7.patch /usr/src/linux-2.4.7-10
		# cd /usr/src/linux-2.4
		# patch -p1 < HiMIPv6_HACNMN-v2.4.7.patch

	e. Have the kernel modules needed selected
		# cd /usr/src/linux-2.4.7-10
		# make menuconfig
		In 'Networking Options -->', select 'IPv6: Mobility Support (EXPERIMENTAL)'.
		Also select 'MIPv6: HiMIPv6(EXPERIMENTAL)' and 'IPv6: MIPv6 ReceiverHomeAddress Option Support'.

	f. Make kernel
		# cd /usr/src/linux-2.4.7-10
		# make clean;make oldconfig;make dep;make bzImage
		# cp arch/i386/boot/bzImage /boot/HiMIPv6-2.4.7
		Add the new kernel image 'HiMIPv6-2.4.7' to boot manager
	
		If you choose LILO to be boot manager, edit '/etc/lilo.conf'.
		The file may be modified and looked like 'SOMEWHERE/lilo.conf'
		After modifying lilo.conf,
		# lilo
		
	g.
		# make modules
		# reboot
		Use HiMIPv6-2.4.7 kernel image to boot.
		# cd /usr/src/linux-2.4.7-10
		# make modules_install	

	h. Install mipdiag tool
		# cd SOMEWHERE/mipv6-0.9-v2.4.7/userspace/
		# ./configure
		# make;make install
		# mknod /dev/mipv6_dev c 0xf9 0
	
	i. Patch mipdiag tool
		# cp SOMEWHERE/mipdiag.c SOMEWHERE/mipv6-0.9-v2.4.7/userspace/
		replace the original file
		# make;make install



2BInstall PCMCIA and Wireless PC Card driver
	a. Extract the driver of PCMCIA (pcmcia-cs-3.2.0.tar.gz)
		# cd SOMEWHERE
		# tar -zxvf pcmcia-cs-3.2.0.tar.gz

	b. Extract the driver of Wireless PC Card (WLLI610.TGZ) to the directory of PCMCIA driver
		# cd SOMEWHERE/pcmcia-cs-3.2.0
		# tar -zxvf ../WLLI610.TGZ
		The wireless card driver(WLLI610.TGZ) is for the AVAYA 802.11b Wireless Card. We STRONGLLY recommand that you use AVAYA 802.11b Wireless Card. OR you have to use your own wireless card driver.
		
	c. Install
		# cd SOMEWHERE/pcmcia-cs-3.2.0
		# make config
		Set Linux Kernel source directory to /usr/src/linux-2.4.7-10.
		Choose 'Y' for all questions, and press Enter(use default) when choosing Module install directory.
		
		# make all;make install
    	# ./Build
		# ./Install
		Modify /etc/pcmcia/wavelan2_cs.conf. Append the following words:
		
		 card "Avaya Wireless PC Card"
	  	  version "Avaya Communication", "Avaya Wireless PC Card"
	  	  bind "wvlan_cs"
	  		
	d. Restart pcmcia
		# /etc/init.d/pcmcia restart



3BInstall Wireless tools (for command 'iwconfig')

	a. Extract wireless_tools.25.tar.gz
		# cd SOMEWHERE
		# tar -zxvf wireless_tools.25.tar.gz
		
	b.Install
		# cd SOMEWHERE/wireless_tools.25
		# make;make install


4BInstall the usagi package(include ping6,telnet for IPv6v6, ftp for IPv6, radvd...)

	a. Extract usagi-linux24-s20020930.tar.bz2
		# cd SOMEWHERE
		# bzip2 -cd usagi-linux24-s20020930.tar.bz2 | tar xvf -
		
	b. Install
		# cd SOMEWHERE/usagi
		# make prepare TARGET=linux24
		# cd SOMEWHERE/usagi/usagi
		# ./configure
		# make;make install
		
	c. Copy the inetd deamon configuration file to /etc
		# cp SOMEWHERE/usagi/usagi/inetd/etc/inetd.conf.sample /etc/inetd.conf
		


5BInstall SNMP Manage System(Optional)

	a. Extract and install net-snmp-5.0.3.tar.gz
		# cd SOMEWHERE
		# tar -zxvf  net-snmp-5.0.3.tar.gz
		# cp SOMEWHERE/mibHiMIPv6.c  SOMEWHERE/net_snmp_5.0.3/agent/mibgroup
		# cp SOMEWHERE/mibHiMIPv6.h  SOMEWHERE/net_snmp_5.0.3/agent/mibgroup
		# cd SOMEWHERE/net_snmp_5.0.3
		#./configure -with-mib-modules="mibHiMIPv6"
		Answer every question by pressing Enter
		
		# make ; umask 022 ;make install
		
		Add a file named 'snmpd.conf' in '/usr/local/share/snmp/',
		containing the following words:

		 rocommunity public
		 rwcommunity private	


6. Final configuration
	# cp SOMEWHERE/hosts /etc/hosts
	overwrite it
	
	# chmod 755 SOMEWHERE/MN/MobileNode.sh
	# chmod 755 SOMEWHERE/MN/ha
	# chmod 755 SOMEWHERE/MN/fma1
	# chmod 755 SOMEWHERE/MN/fma2

	Now we have to configure a static IPv6 address of Mobile Node.
	# modprobe ipv6
	# ifconfig eth1 up
	# ifconfig eth1
	You should see the display like this:

eth1	Link encap:Ethernet  HWaddr 00:40:95:0D:14:1C  
		inet addr:199.33.248.2  Bcast:199.33.248.255  Mask:255.255.255.0
		inet6 addr: fe80::240:95ff:fe0d:141c/10 Scope:Link
		UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
		RX packets:2466 errors:0 dropped:0 overruns:0 frame:0
		...............
		
	Remember the last 64bits of inet6 on-link address (in this case: '240:95ff:fe0d:141c').
	Mmodify 'SOMEWHERE/MN/MobileNode.sh', set the right address..
	
	Also, you may like to set the ipv6 address of Mobile Node for alias in the file '/etc/hosts' on every machines.
	
	
7.
	After Mobile Node booted, use
	# SOMEWHERE/MN/MobileNode.sh
	to get HiMIPv6 test bed ready.
	
	use
	# SOMEWHERE/MN/ha
	to change the channel of wireless card to be the same with Home Agent.
	i.e. make Mobile Node to be in the coverage of Home Agent in home network

	use
	# SOMEWHERE/MN/fma1
	to change the channel of wireless card to be the same with Leaf-1 Foreign Mobility Agent.
	i.e. make Mobile Node to be in the coverage of Leaf-1 Foreign Mobility Agent in foreign network

	use
	# SOMEWHERE/MN/fma2
	to change the channel of wireless card to be the same with Leaf-2 Foreign Mobility Agent.
	i.e. make Mobile Node to be in the coverage of Leaf-2 Foreign Mobility Agent in foreign network
	

